package com.yycx.module.bus.provider.service;

import com.yycx.common.mybatis.base.service.IBaseService;
import com.yycx.common.mybatis.model.ResultBody;
import com.yycx.module.bus.client.entity.BusDeposit;
import com.yycx.module.bus.client.entity.BusPayment;
import com.yycx.module.bus.client.entity.BusSalemanBalance;

import java.io.Serializable;
import java.util.Map;

/**
 * 押金管理 接口
 *
 * @author flyme
 * @date 2023-07-29
 */
public interface BusDepositService extends IBaseService<BusDeposit> {

    /**
     * 退还押金
     * @param params
     * @return
     */
    ResultBody refundAmount(Map params);

    /**
     * 关联退款ID
     *
     * @param paymentId
     * @param depositId
     * @return
     */
    boolean updateRefundId(Long paymentId, Long depositId);

    /**
     * 清除退款ID
     * @param paymentId
     * @return
     */
    boolean clearRefundId(Serializable paymentId);

    /**
     * 更新退款信息
     * @param payment
     * @return
     */
    boolean updateRefund(BusPayment payment);


    /**
     * 添加押金收款记录
     * @param payment
     */
    void addDeposit(BusPayment payment);

    /**
     * 更新认款状态
     * @param rkId
     * @param depositState
     */
    void updateDepositState(Long rkId,Integer depositState);
}
